package com.hu.video.service.impl;

import com.hu.video.entity.VideoWhitelist;
import com.hu.video.mapper.VideoWhitelistMapper;
import com.hu.video.service.IVideoWhitelistService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class VideoWhitelistServiceImpl implements IVideoWhitelistService {
    @Autowired
    private VideoWhitelistMapper mapper;

    @Override
    public List<VideoWhitelist> getByVideoId(Long videoId) {
        return mapper.selectByVideoId(videoId);
    }

    @Override
    public void addWhitelist(VideoWhitelist whitelist) {
        mapper.insert(whitelist);
    }

    @Override
    public void removeWhitelist(VideoWhitelist whitelist) {
        mapper.delete(whitelist);
    }
} 